<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="main_left">
<div class="cont">
	<a href="javascript:;" class="yellow_btn btn" onclick="loadModule('advance');">返回</a>
	
	<h2 class="title">客人信息：</h2>
	<div class="b_div">
		<p class="clearfix">
			<span class="info_s fl">客户名称：${detail.customer.name }</span>
			<span class="info_s fl">联系电话：${detail.customer.tel }</span></span>
			<span class="info_s fl">传真：${detail.customer.fax }</span>
			<span class="info_s fl">邮箱：${detail.customer.email }</span>
		</p>
		<p class="clearfix">
			<span class="info_s fl">公司地址：${detail.customer.comaddress }</span>
		</p>
		<p class="clearfix">
			<span class="info_s fl">送货地址：${detail.customer.address }</span>
		</p>
	</div>
	
    <h2 class="title">历次发货信息：</h2>
    <div class="ui">
        <table class="table_list">
            <tr class="">
              <th class="">序号</th>
              <th>品名</th>
              <th class="">二维码</th>
              <th class="">年份</th>
              <th class="">批次</th>
              <th class="">类型</th>
              <th class="">预收价格</th>
              <th class="">现价</th>
              <th class="">成交价格</th>
              <th class="">成交时间</th>
            </tr>
            <c:forEach items="${detail.items }" var="item" varStatus="status">
            <tr class="">
              <td class="">${status.index+1 }</td>
              <td class="">${item.product_name }</td>
              <td class="">${item.qrcode_id }</td>
              <td class="">${item.productionyear }</td>
              <td class="">${item.batch }</td>
              <td class="">${item.unit_display }</td>
              <td class="">${item.advance_price }</td>
              <td class="">${item.org_price }</td>
              <td class="">${item.now_price }</td>
              <td class="">${item.create_time }</td>
            </tr>
            </c:forEach>
        </table>
    </div>
    
    
	</div>
	</div>
	<div class="main_right">
          <div class="cont">
            <h2 class="title">预收款信息：</h2>
            <div class="money">
              <p class="a_title">应收总金额：<em>${detail.advance.total_amount }</em></p>
            </div>
            <c:forEach items="${detail.pays }" var="pay" >
            <table class="table_list_nb">
				<tr class="">
				  <td class="label_t">交易时间：</td>
				  <td class="">${pay.create_time }</td>
				</tr>
				<tr class="">
				  <td class="label_t">现金支付：</td>
				  <td class="">${pay.cash_amount }</td>
				</tr>
				<tr class="">
		           <td class="label_t">抹零：</td>
		           <td class="">${pay.wipe_amount }</td>
				</tr>
				<tr class="">
					<td class="label_t">银行刷卡：</td>
					<td class="">${pay.pay_amount }</td>
				</tr>
				<tr class="">
					<td class="label_t">流水号：</td>
					<td class="">${pay.serial_no }</td>
				</tr>
				<tr class="">
					<td class="label_t">会员刷卡：</td>
					<td class="">${pay.vip_amount }</td>
				</tr>
				<tr class="">
					<td class="label_t">抹零：</td>
					<td class="">${pay.wipe_amount }</td>
				</tr>
				<tr class="">
					<td class="label_t">应收金额：</td>
					<td class="">${pay.sum_amount }</td>
				</tr>
				<tr class="">
					<td class="label_t">实收金额：</td>
					<td class="">${pay.pay_amount }</td>
				</tr>
          </table>
          </c:forEach>
          </div>
          <button onclick="window.open('${basePath }/trade/advance_detail.htm?print=1&orderId=${detail.order.id }&customerId=${detail.customer.id}');">Advance_PRINT</button>
      </div>

